Your defense minister monitors the growth of other empire's military and naval muscle. He will provide warnings of threatening moves.
When you see these warnings you must be ready to expand your forces rapidly. This means stockpiling arms and cash so that laborers can be conscripted into the army immediately.
Remember that you can recover from any disaster except the loss of your capital city. Defense forces should be concentrated there if you suspect you are weaker than other empires or if there are large enemy fleets off your coast.